<?php
//session_start();
/*Author's Statement:
This script is based on ideas of the author.
You may copy, modify and use it for any purpose. The only condition is that if you publish web pages that use this script you point to its author at a suitable place and don't remove the content part of the <meta name=AUTHOR>-tag  from it.
It's your responsibility to handle possible bugs even if you didn't modify anything. I cannot promise any support.
Dieter Bungers, Email: bungers@gmd.de and db@infovation.de
GMD (www.gmd.de) and infovation (www.infovation.de)*/

if($_GET["quit"]!=1){

require("mainmenu.php");

  if ($currentNumber == "") $currentNumber = "0";

  if ($currentIsExpanded == "") $currentIsExpanded = "1";

  $theHref = "";

  for ($i=0; $i<sizeof($tocTab); $i++) {

    if ($currentNumber == $tocTab[$i][0]) {

      $theHref = $tocTab[$i][2];
			$_SESSION["cur_num"]= $currentNumber;
			break;
		}
	}
}

if($_GET["quit"] == 1 || $_SESSION["LETME_OUT"]){

  if(isset($_SESSION["userses"])){

    unset($_SESSION["userses"]);
		//print_r($_SESSION);
		session_destroy();
	}
	echo "<html>
				<head>
				<meta http-equiv='Pragma' content='no-cache'>
				<meta http-equiv='refresh' content='2; URL=index.php'>
				</head>
				<body><B>Closing...</b></body>
				</html>";
}

//if ($_SESSION["user_ip_ses"] != $_SERVER["REMOTE_ADDR"]){
?>

<? if($quit==1 || $_SESSION["LETME_OUT"] || $_SESSION["PRINT_ME"]) echo "<!--\n"; ?>
	<html>
	<head>
	<meta http-equiv="Pragma" content="no-cache">
	<title>ECS ONLINE</title>
	<meta name="AUTHOR" content="Technique for ToC generation by Dieter Bungers, Email: bungers@gmd.de and db@infovation.de">
	</head>
	<frameset cols="200,*" border=1>
		<frame src="toc.php3?currentNumber=<?php echo $currentNumber; ?>&currentIsExpanded=<?php echo rawurldecode($currentIsExpanded); ?> &prev_num=<?php echo $prev_num;  ?>" name="toc">
		<frame src="<?php $theHref = $theHref . "? "; echo rawurldecode($theHref); ?>" name="content">
	</frameset>
<? if($quit==1 || $_SESSION["LETME_OUT"] || $_SESSION["PRINT_ME"]) echo "\n-->\n";?>


<!--<frame src="<?php $theHref = $theHref . "?&user=" .$user. "&pass=" .$pass. "&user_id=" .$user_id. "&orcl=" .$orcl. "&prev_num=" .$prev_num ."&view=" .$view. "&company_sel=" .$company_sel; echo rawurldecode($theHref); ?><!--" name="content">
<!--//&user=<?php echo $user; ?>&pass=<?php echo $pass; ?> &user_id=<?php echo $user_id; ?>&company_sel=<?php echo $company_sel; ?>&orcl=<?php echo $orcl; ?>-->



